<script setup lang="ts">
defineOptions({
  name: 'GlobalFooter'
});

function getCopyRight(): string {
  const startYear = import.meta.env.VITE_START_YEAR;
  const year = new Date().getFullYear();
  if (startYear === year) {
    return `${year} ${import.meta.env.VITE_COMPANY}`;
  }
  return `${startYear} - ${year} ${import.meta.env.VITE_COMPANY}`;
}
</script>

<template>
  <DarkModeContainer class="h-full flex-center">Copyright © {{ getCopyRight() }}</DarkModeContainer>
</template>

<style scoped></style>
